Removes the specified row from the SelBookmarks collection, or the specified Column object from the Columns collection of a DataGrid control.
Syntax
object.Remove index
The Remove method syntax has these parts:
Part | Description |
object | An object expression that evaluates to an object in the Applies To list. |
index | Required. An integer in the range of 0 to the Count property setting of the collection – 1. |
Remarks
For the SelBookmarks collection, the Remove method removes the row specified by the index argument, then decrements the SelBookmarks.Count property by 1. If the row removed from the SelBookmarks collection is visible, it will be deselected in the DataGrid control.
For the Columns collection, the Remove method removes the column specified by the index argument, then decrements the Columns.Count property by 1.
If you specify a row that isn't in the SelBookmarks collection or a Column object that isn't in the Columns collection, a trappable error occurs.